package cn.itsource.pet.domain;

import cn.itsource.basic.domain.BaseDomain;
import cn.itsource.basic.domain.BaseTreeNode;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 部门实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "t_search_master_message")
public class SearchMasterMessage extends BaseDomain {
    private String name;
    private String price;
    private String age;
    private Integer gender;
    private String coatColor;
    private String resources;
    @NotNull(message = "宠物类型不能为空")
    private String petType;
    private String title;
    private Integer state;
    private String address;
    private Long userId;
    private Long shopId;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime = new Date();
    @Transient
    private String petTypeName;
    private String note;
}
